Skip to content

Add Opt-in Clang Explicitly Built Modules Support for C++/ObjC++ Sources - #1599

Draft
qiongsiwu wants to merge 1 commit into
swiftlang:mainfrom
qiongsiwu:eng_172304064_block_list
Draft

qiongsiwu wants to merge 1 commit into
swiftlang:mainfrom
qiongsiwu:eng_172304064_block_list

Conversation

@qiongsiwu

@qiongsiwu qiongsiwu commented Aug 5, 2026 •

Copy link
Copy Markdown

This PR enables explicitly built modules (EBM) for C++/ObjC++ files when modules are enabled, and the clang flag -fcxx-modules is in effect. It additionally adds a check against a block list, so that for projects that do not work with EBM well at the moment to opt out.

@qiongsiwu

Copy link
Copy Markdown
Author

@swift-ci please test

@qiongsiwu
qiongsiwu requested a review from cyndyishida August 6, 2026 15:45
@cyndyishida

cyndyishida commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Why do we need separate settings? My feeling is that it adds more staging steps than we likely need. I think we should have a blocklist just for CLANG_ENABLE_EXPLICIT_MODULES and opt objective-c++/c++ sources in the same setting.

@qiongsiwu

Copy link
Copy Markdown
Author

Why do we need separate settings? My feeling is that it adds more staging steps than we likely need.

My understanding of the staging process is that we want to turn on CLANG_ENABLE_EXPLICIT_MODULES for C++/ObjC++ sources, and run world builds to figure out the content of the block list. I checked with @owenv and it seems to be rather cumbersome to run world builds with a custom swift-build. The suggestion is to land the enablement with the gating option default to off, and then run world build using a submitted swift-build with the gating option turned on.

I think we should have a blocklist just for CLANG_ENABLE_EXPLICIT_MODULES and opt objective-c++/c++ sources in the same setting.

What do we mean exactly by opt objective-c++/c++ sources in the same setting? Does this mean we want to flip CLANG_ENABLE_EXPLICIT_MODULES on only conditioning on EBM on and the block list? I don't quite see how that can work with an empty block list.

@qiongsiwu
qiongsiwu marked this pull request as draft August 6, 2026 18:20
Default

Enables EBM for C++/ObjC++ source files and adding a block list to
disable explicit modules for C++/ObjC++ source files.
@qiongsiwu
qiongsiwu force-pushed the eng_172304064_block_list branch from 84b213c to 124ca36 Compare September 24, 2026 23:13
@qiongsiwu

Copy link
Copy Markdown
Author

@swift-ci please test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants